package oo1;

import java.util.Scanner;

public class UserTest {

	public static void main(String[] args) {
		User u = new User();
		u.showInfo();
		// u.changePass();
		Scanner in = new Scanner(System.in);
		while (true) {
			System.out.println("亲输入用户名和密码：");
			String oldName = in.next();
			String oldPass = in.next();
			if (u.name.equals(oldName) && u.password.equals(oldPass)) {
				System.out.println("请输入新密码：");
				u.password = in.next();
				break;
			}
			System.out.println("信息不匹配，不能修改");
		}

		System.out.println(">>>>>>>>>>修改后：");
		// System.out.println("看看修改成功了？" + u.password);
		u.showInfo();
	}

}
